#include<iostream>
using namespace std;

int main(void)
{

	unsigned value = 81;
	while (value--)
	{
		if (value / 9 % 3 == value % 9 % 3)
		{
			continue;
		}
		cout << "A = " << value / 9 + 1 << "," << "B= " << value % 9 + 1 << endl;
	}
	
	system("pause");
	return 0;
}